/****************************************************
	文件：GameRoot.cs
	作者：HuskyT
	邮箱：1005240602@qq.com
	日期：2020/8/26 13:31:14
	功能：Game根节点
*****************************************************/

using System;
using UnityEngine;

namespace AIFramework.HTN
{
    public class GameRoot : MonoBehaviour
    {
        private TrunkThumper mTrunkThumper;
        private void Start()
        {
            mTrunkThumper = new TrunkThumper();
            mTrunkThumper.Name = "神树巨人";
            mTrunkThumper.BuildAI();
            mTrunkThumper.Brain.SetOpponent(new EntityBase() { Name = "陈老板" });
            //mTrunkThumper.Brain.DoPlan();
        }
        private void Update()
        {
            if (Input.GetKeyDown(KeyCode.Q))
            {
                Debug.LogWarning("//--------------------  新计划 start --------------------//");
                mTrunkThumper.Brain.DoPlan();
                Debug.LogWarning("//--------------------  新计划 end --------------------//");
            }

            if (Input.GetKeyDown(KeyCode.W))
            {
                Debug.LogWarning("//--------------------  执行 start --------------------//");
                mTrunkThumper.Brain.DoRun();
                Debug.LogWarning("//--------------------  执行 end --------------------//");
            }
        }
    }
}
